package com.asiainfo.servlet;

import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.logging.Level;
import java.util.logging.Logger;


public class LoginServlet extends HttpServlet {
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException
    {
        response.setHeader("content-type","text/html;charset=utf-8");
        ServletOutputStream stream = response.getOutputStream();
        stream.write("Hello Evenyone".getBytes("utf-8"));
        Logger logger = Logger.getLogger("demo");
        logger.setLevel(Level.INFO);
        logger.info("进入请求");
    }
    protected void doPost(HttpServletRequest request,HttpServletResponse response) throws IOException {
        this.doGet(request,response);
    }

}
